﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};

	var auditData = Jxstar.findComboData('audit');
	var filetypeData = Jxstar.findComboData('filetype');
	var proftypeData = Jxstar.findComboData('proftype');

	var cols = [
	{col:{header:'记录状态', width:79, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: auditData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: auditData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < auditData.length; i++) {
				if (auditData[i][0] == value)
					return auditData[i][1];
			}
		}}, field:{name:'project_file__auditing',type:'string'}},
	{col:{header:'资料名称', width:181, sortable:true}, field:{name:'project_file__file_name',type:'string'}},
	{col:{header:'资料类别', width:192, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: filetypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: filetypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < filetypeData.length; i++) {
				if (filetypeData[i][0] == value)
					return filetypeData[i][1];
			}
		}}, field:{name:'project_file__file_type',type:'string'}},
	{col:{header:'专业类别', width:100, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: proftypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: proftypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < proftypeData.length; i++) {
				if (proftypeData[i][0] == value)
					return proftypeData[i][1];
			}
		}}, field:{name:'project_file__pro_type',type:'string'}},
	{col:{header:'资料描述、检索内容', width:336, sortable:true}, field:{name:'project_file__file_desc',type:'string'}},
	{col:{header:'上传日期', width:100, sortable:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'project_file__file_date',type:'date'}},
	{col:{header:'上传人', width:72, sortable:true}, field:{name:'project_file__file_user',type:'string'}},
	{col:{header:'上传人ID', width:100, sortable:true, hidden:true}, field:{name:'project_file__file_userid',type:'string'}},
	{col:{header:'主键', width:100, sortable:true, hidden:true}, field:{name:'project_file__file_id',type:'string'}},
	{col:{header:'管理部门', width:100, sortable:true}, field:{name:'project_file__dept_name',type:'string'}},
	{col:{header:'部门ID', width:100, sortable:true, hidden:true}, field:{name:'project_file__dept_id',type:'string'}},
	{col:{header:'上传资料附件', width:100, sortable:true, hidden:true}, field:{name:'project_file__attach_file',type:'string'}}
	];
	
	config.param = {
		cols: cols,
		sorts: null,
		hasQuery: '1',
		isedit: '0',
		isshow: '1',
		funid: 'project_file'
	};
	
	
		
	return new Jxstar.GridNode(config);
}